AC_INIT([libvscf],[0.02],[blblack@gmail.com],[libvscf],[http://libvscf.googlecode.com])
AC_PREREQ(2.65)
AC_CONFIG_AUX_DIR([acaux])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([1.11.1 dist-bzip2 dist-xz foreign])

AC_CANONICAL_HOST

AC_PROG_CC
AC_PROG_CC_C99(,AC_MSG_ERROR([your compiler lacks sufficient C99 support]))

LT_INIT([disable-fast-install])
LT_PREREQ([2.2.6b])
AC_SUBST([LIBTOOL_DEPS])

dnl Find ragel
AC_MSG_CHECKING([for Ragel v6.6]);
AC_REQUIRE_AUX_FILE([noragel])
AC_PATH_PROGS_FEATURE_CHECK([RAGEL], [ragel],
  [[$ac_path_RAGEL --version |$GREP -q 'Ragel State Machine Compiler version 6.6 Dec 2009' && ac_cv_path_RAGEL=$ac_path_RAGEL ac_path_RAGEL_found=:]],
  [ac_cv_path_RAGEL=$am_aux_dir/noragel])
AC_SUBST([RAGEL], [$ac_cv_path_RAGEL])
AC_MSG_RESULT([$ac_cv_path_RAGEL])

dnl Output generation
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([
  Makefile
  src/Makefile
])
AC_OUTPUT
